//
//  Button_type.m
//  Bullet
//
//  Created by  on 2019/9/10.
//  Copyright © 2019 . All rights reserved.
//

#import "Button_type.h"

@implementation Button_type

-(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event{
    CGRect bounds = self.bounds;
    CGFloat widthDelta = MAX(self.touchSize.width - bounds.size.width, 0);
    CGFloat heightDelta = MAX(self.touchSize.height - bounds.size.height, 0);
    CGRect NewBounds = CGRectInset(bounds, -0.5*widthDelta, -0.5*heightDelta);
    return CGRectContainsPoint(NewBounds, point);
}


@end
